import service from '../api'
export function list(uri, data, showLoading = true) {
    return service.get(uri, { params: data, showLoading: showLoading })
}
export function remove(uri, key, showLoading = true) {
    let url = `${uri}/${key}`
    return service.delete(url, {}, { showLoading: showLoading })
}
export function retrieve(uri, key, showLoading = true) {
    let url = `${uri}/${key}`
    return service.get(url, { showLoading: showLoading })
}
export function create(uri, data, showLoading = true) {
    return service.post(uri, data, { showLoading: showLoading })
}
export function put(uri, key, data, showLoading = true) {
    let url = `${uri}/${key}`
    return service.put(url, data, { showLoading: showLoading })
}
export function patch(uri, key, data, showLoading = true) {
    let url = `${uri}/${key}`
    return service.put(url, data, { showLoading: showLoading })
}